package com.yunche.yunchebusiness.mvp.model

import com.yunche.yunchebusiness.base.BaseResponse
import com.yunche.yunchebusiness.base.rx.SchedulerUtils
import com.yunche.yunchebusiness.entity.ModelEntity
import com.yunche.yunchebusiness.entity.SeriesEntity
import com.yunche.yunchebusiness.network.RetrofitManager
import io.reactivex.Observable
import okhttp3.RequestBody

/**
 * Create by Crcker on 2018/12/21 15:10
 * Email: Crcker@163.com
 */


class SeriesModel {

    fun getSeries(requestBody: RequestBody): Observable<BaseResponse<List<SeriesEntity>>> {
        return RetrofitManager.service.getSeries(requestBody).compose(SchedulerUtils.ioToMain())
    }

    fun getModel(requestBody: RequestBody): Observable<BaseResponse<List<ModelEntity>>> {
        return RetrofitManager.service.getModel(requestBody).compose(SchedulerUtils.ioToMain())
    }


}